define(['plugins/router', 'plugins/http', 'knockout'], function(router, http, ko) {
    var data = {
        modules: ko.observableArray([]),
        goModule: function(item) {
            if (item) {
                router.navigate('#' + item.Name());
            }
        },
        activate: function() {
            var self = this;
            http.get('mock/app.modules.json').then(function(data) {
                ko.mapping.fromJS(data.Modules, {}, self.modules)
            })
        }
    };
    return data;
});